package com.oracle.calllog.etl.reducer;

import org.apache.hadoop.hbase.client.Mutation;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.mapreduce.TableReducer;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/******************************************
 * @ClassName CalllogsEtl2HBaseReducer
 * @Description ETL流程的Reducer类
 * @Author Mr.Chen
 * @Date 2022/6/11 21:13
 * @Version 1.0
 *****************************************/
public class CalllogsEtl2HBaseReducer extends TableReducer<Text, Put, NullWritable> {
    @Override
    protected void reduce(Text key, Iterable<Put> values, Context context) throws IOException, InterruptedException {
        for(Put put : values){
            context.write(NullWritable.get(),put);
        }
    }
}
